home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cookbook USA: Drips, Dressings & Sauces
/
Cookbook USA - Drips, Dressings & Sauces (1997)(MicroMedia).iso
/
ch15
/
frmreadm.frm
< prev
next >
Wrap
Text File
|
1996-07-06
|
7KB
|
258 lines
VERSION 2.00
Begin Form frmReadMe
BackColor = &H00FFFF80&
Caption = "Online Instruction Guide"
ClientHeight = 6675
ClientLeft = 3345
ClientTop = 3285
ClientWidth = 7410
Height = 7080
Icon = FRMREADM.FRX:0000
Left = 3285
LinkTopic = "Form3"
ScaleHeight = 6675
ScaleWidth = 7410
Top = 2940
Width = 7530
Begin CommandButton Demo30
Caption = "New Version 3.0 Features"
Height = 435
Left = 375
TabIndex = 10
Top = 5205
Width = 6720
End
Begin FileListBox filReadChecker
Height = 420
Left = 315
TabIndex = 9
Top = 6090
Visible = 0 'False
Width = 375
End
Begin CommandButton CmdExit
BackColor = &H00FF0000&
Caption = "E&xit"
Height = 495
Left = 5865
TabIndex = 8
Top = 5835
Width = 1215
End
Begin CommandButton cmdCopyright
BackColor = &H00FF0000&
Caption = "Copy&rights and Permissions"
Height = 495
Left = 360
TabIndex = 7
Top = 4560
Width = 6735
End
Begin CommandButton cmdTechSupport
BackColor = &H00FF0000&
Caption = "Getting &Technical Support"
Height = 495
Left = 360
TabIndex = 6
Top = 3960
Width = 6735
End
Begin CommandButton cmdPrinting
BackColor = &H00FF0000&
Caption = "&Printing and Saving a Recipe"
Height = 495
Left = 360
TabIndex = 5
Top = 3360
Width = 6735
End
Begin CommandButton cmdDisplaying
BackColor = &H00FF0000&
Caption = "&Displaying the Recipe"
Height = 495
Left = 360
TabIndex = 4
Top = 2760
Width = 6735
End
Begin CommandButton cmdSearching
BackColor = &H00FF0000&
Caption = "&Searching for a Recipe"
Height = 495
Left = 360
TabIndex = 3
Top = 2160
Width = 6735
End
Begin CommandButton cmdBrowsing
BackColor = &H00FF0000&
Caption = "&Browsing through the Recipes"
Height = 495
Left = 360
TabIndex = 2
Top = 1560
Width = 6735
End
Begin CommandButton cmdOverview
BackColor = &H00FF0000&
Caption = "&Overview of Cookbook U.S.A. Software"
Height = 495
Left = 360
TabIndex = 1
Top = 960
Width = 6735
End
Begin CommandButton cmdInstallation
BackColor = &H00FF0000&
Caption = "&Installation Instructions"
Height = 495
Left = 360
TabIndex = 0
Top = 360
Width = 6735
End
End
' frmReadme displays the contents of each of the README.DAT
' files, and the user may click on whichever subject is
' of interest. This loads frmReader, which displays the
' full text of that subject. Clicking Exit will return
' to frmMain.
Option Explicit
'--------------------------------------------------------------------------
Sub cmdBrowsing_Click ()
GoFormReader "READ3.DAT", "Browsing Through the recipes"
End Sub
'--------------------------------------------------------------------------
Sub cmdCopyright_Click ()
GoFormReader "READ8.DAT", "Copyrights and Permissions"
End Sub
'--------------------------------------------------------------------------
Sub cmdDisplaying_Click ()
GoFormReader "READ5.DAT", "Displaying a Recipe"
End Sub
'--------------------------------------------------------------------------
Sub cmdExit_Click ()
Unload demo
Hide
frmMain.Show
End Sub
'--------------------------------------------------------------------------
Sub cmdInstallation_Click ()
GoFormReader "READ1.DAT", "Installation Instructions"
End Sub
'--------------------------------------------------------------------------
Sub cmdOverview_Click ()
GoFormReader "READ2.DAT", "General Overview"
End Sub
'--------------------------------------------------------------------------
Sub cmdPrinting_Click ()
GoFormReader "READ6.DAT", "Printing and saving recipes"
End Sub
'--------------------------------------------------------------------------
Sub cmdSearching_Click ()
GoFormReader "READ4.DAT", "Searching for a Recipe"
End Sub
'--------------------------------------------------------------------------
Sub cmdTechSupport_Click ()
GoFormReader "READ7.DAT", "Obtaining Technical Support"
End Sub
Sub Demo30_Click ()
demo.Show
End Sub
'--------------------------------------------------------------------------
Function fnFileName (filename$, Path$)
If filename$ = "" Then Exit Function
If Path$ = "" Then Path = App.Path
If Right$(Path$, 1) <> "\" Then Path$ = Path$ & "\"
If Left$(filename$, 1) = "\" Then filename$ = Mid$(filename$, 2)
fnFileName = Path$ & filename$
End Function
Sub Form_Load ()
' centering the form
Me.Left = (screen.Width - Me.Width) / 2
Me.Top = Abs((screen.Height - Me.Height) / 2)
End Sub
'--------------------------------------------------------------------------
Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then Call cmdExit_Click
End Sub
'--------------------------------------------------------------------------
Sub GoFormReader (filename$, Caption$)
Dim TextBuffer As String
Dim FileNumber As Integer
Dim filenum As Integer
'First, check to see if the instruction file is present on the hard drive.
FilReadChecker.Path = App.Path
FilReadChecker.Pattern = filename$
If FilReadChecker.ListCount = 0 Then
'It's not there, get it from the CD-ROM
FilReadChecker.Path = CDDRIVE$
FilReadChecker.Pattern = filename$
If FilReadChecker.ListCount = 0 Then
MsgBox "The instruction files are not installed correctly. Please install/re-install Cookbook U.S.A.", 48, "File Error"
Exit Sub
End If
End If
MakeMouseCursorHourglass
Load frmReader
frmReader.Caption = Caption$
filenum = FreeFile
Open CDDRIVE$ + filename$ For Input As filenum
Do Until EOF(filenum)
Line Input #filenum, TextBuffer$
frmReader.txtTextViewer = frmReader.txtTextViewer & Chr$(13) & Chr$(10) & TextBuffer$
Loop
Close filenum
frmReader.Show
Hide
MakeMouseCursorDefault
End Sub